package com.hxc.common.controller;

import com.hxc.common.common.ResultVO;
import com.hxc.common.service.TestService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/test")
@Api(tags = {"测试连通"})
public class TestController {
    @Resource
    private TestService testService;

    @ApiOperation("测试1")
    @PostMapping("/test1")
    @Transactional(rollbackFor = Exception.class)
    public ResultVO addExamCourse(){
        return new ResultVO(testService.test());
    }

}
